/*************************************************************
 * Title: MybatisPersistenceSupport.java
 * Description: 
 * Author: Huang Shaobin
 * Email: shaobin.software@gmail.com
 * CreateTime: Feb 22, 2013 5:45:25 PM
 ************************************************************/
package snow.core.persistence.mybatis;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.InitializingBean;

import snow.core.domain.Pagination;
import snow.core.persistence.Conditions;
import snow.core.persistence.Order;
import snow.core.persistence.PersistenceSupport;

/**
 *
 */
public class MybatisPersistenceSupport implements PersistenceSupport, InitializingBean {

	private BeanFactory beanFactory;

	public void afterPropertiesSet() throws Exception {
		
	}

	/**
	 * @param entity
	 * @see snow.core.persistence.PersistenceSupport#delete(java.lang.Object)
	 */
	public void delete(Object entity) {

	}

	/**
	 * @param <T>
	 * @param entityClass
	 * @param conditions
	 * @param orders
	 * @param start
	 * @param limit
	 * @return
	 * @see snow.core.persistence.PersistenceSupport#find(java.lang.Class, snow.core.persistence.Conditions, java.util.List, int, int)
	 */
	public <T> List<T> find(Class<T> entityClass, Conditions conditions, List<Order> orders, int start, int limit) {
		return null;
	}

	/**
	 * @param <T>
	 * @param entityClass
	 * @param id
	 * @return
	 * @see snow.core.persistence.PersistenceSupport#find(java.lang.Class, java.io.Serializable)
	 */
	public <T> T find(Class<T> entityClass, Serializable id) {
		return null;
	}

	/**
	 * @param entityClass
	 * @param conditions
	 * @param orders
	 * @param start
	 * @param limit
	 * @return
	 * @see snow.core.persistence.PersistenceSupport#findForPaging(java.lang.Class, snow.core.persistence.Conditions, java.util.List, int, int)
	 */
	public Pagination findForPaging(Class<?> entityClass, Conditions conditions, List<Order> orders, int start, int limit) {
		return null;
	}

	public BeanFactory getBeanFactory() {
		return beanFactory;
	}

	/**
	 * @param <ID>
	 * @param entity
	 * @param idClass
	 * @return
	 * @see snow.core.persistence.PersistenceSupport#save(java.lang.Object, java.lang.Class)
	 */
	public <ID extends Serializable> ID save(Object entity, Class<ID> idClass) {
		return null;
	}

	public void setBeanFactory(BeanFactory beanFactory) {
		this.beanFactory = beanFactory;
	}

	/**
	 * @param entity
	 * @see snow.core.persistence.PersistenceSupport#update(java.lang.Object)
	 */
	public void update(Object entity) {

	}

}
